package com.rewind.test.conf;

import com.rewind.test.entity.Person;
import org.springframework.boot.autoconfigure.condition.AllNestedConditions;
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;

/**
 * @author Rewind
 */
public class BeanAndProperty extends AllNestedConditions {

    /*public BeanAndProperty(ConfigurationPhase configurationPhase) {
        super(configurationPhase);
    }*/

    public BeanAndProperty() {
        super(ConfigurationPhase.REGISTER_BEAN);
    }


    @ConditionalOnBean(Person.class)
    static class OnBean{}

    @ConditionalOnProperty(value = "myConf.person",havingValue = "true")
    static class OnPropery{}
}
